<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
request.setAttribute("path", basePath);  
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>会员登录</title>
<!-- 修改引用文件路径方式，避免重定向后样式设置文件丢失 --> 
<link rel="stylesheet" type="text/css" href="${path}/pages/css/login.css">
<script type="text/javascript" src="${path}/pages/common/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="${path}/pages/js/login.js"></script>
<script type="text/javascript">
    	//修改图片(修改之前需要先拿到这张图片)
    	function changeImg(img){
    		//console.debug(document.getElementById("myImg"));
    		//如果请求相同，会找缓存中的数据，就不会重新发送 
    		//每次请求产生不同的产生提交
    		img.src = "/xiaomi/user/randomCode?code="+Math.random();
    	}
    </script>
</head>
<body>
<!-- login -->
		<div class="top center">
			<div class="logo center">
				<a href="./index.html" target="_blank"><img src="${path}pages/image/mistore_logo.png" alt=""></a>
			</div>
		</div>
		<form  method="post" action="/xiaomi/user/login" class="form center">
		<div class="login">
			<div class="login_center">
				<div class="login_top">
					<div class="left fl">会员登录</div>
					<div class="right fr">您还不是我们的会员？<a href="./register.html" target="_self">立即注册</a></div>
					<div class="clear"></div>
					<div class="xian center"></div>
				</div>
				<div class="login_main center">
					<div class="username">手机号:&nbsp;<input class="shurukuang" type="text" maxlength="11" id="telephone" name="telephone" placeholder="请输入你的手机号" /><div class="prompt" style="margin-left: 54px"><span id="prompt" style="font-size: 10px;color: red"></span></div></div>
					<div class="username">密&nbsp;&nbsp;&nbsp;&nbsp;码:&nbsp;<input class="shurukuang" type="password" maxlength="18" id="password" name="password" placeholder="请输入你的密码"/><div class="cue" style="margin-left: 54px"><span id="cue" style="font-size: 10px;color: red"></span></div></div>
					<div class="username">
						<div class="left fl">验证码:&nbsp;<input class="yanzhengma" type="text" maxlength="5" id="verification" name="code" placeholder="请输入验证码"/><div class="hint" style="margin-left: 54px"><span id="hint" style="font-size: 10px;color: red"></span></div></div>
						<div class="right fl"><img id="codeimg" src="/xiaomi/user/randomCode" style="cursor:pointer;"
					 title="点我替换.." onclick="changeImg(this)" ></div>
						<div class="clear"></div>
					</div>
				</div>
				<div class="login_submit">
					<input class="submit" type="button" id="submit" name="submit" value="立即登录" >
				</div>
				
			</div>
		</div>
		</form>
		<footer>
			<div class="copyright">简体 | 繁体 | English | 常见问题</div>
			<div class="copyright">小米公司版权所有-京ICP备10046444-<img src="${path}pages/image/ghs.png" alt="">京公网安备11010802020134号-京ICP证110507号</div>
		</footer>
</body>
</html>